/**
 * Project Name:fastPlat
 * File Name:DeliveryAddress.java
 * Package Name:com.fast.user.model.member
 * Date:2015年3月6日上午11:01:08
 * Copyright (c) 2015, lsflu@126.com All Rights Reserved.
 *
 */

package com.fast.user.model.member;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.fast.base.db.model.Commnent;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * ClassName:DeliveryAddress <br/>
 * 用途: 收货地址 一个会员对应多条收货地址 <br/>
 * 开发人员：lushuifa http://lushuifa.iteye.com/ 邮箱:lsflu@126.com
 * 
 * @version
 * @since JDK 1.6
 * @see Date: 2015年3月6日 上午11:01:08 <br/>
 */
@Entity
@Table(name = "t_user_DeliveryAddress")
@DynamicInsert(true)
@DynamicUpdate(true)
public class DeliveryAddress {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false, length = 10)
	private int id;
	@Column(name = "uuid", columnDefinition = ("varchar(64) comment '唯一属性ID'"))
	private String uuid = "";
	@Column(name = "user_id", columnDefinition = ("varchar(64) comment '关联用户ID'"))
	private String userId = "";

	@Column(name = "recipient", columnDefinition = ("varchar(64) comment '接收人'"))
	private String recipient = "";// 接收人
	@Column(name = "nationality", columnDefinition = ("varchar(64) comment '国籍'"))
	private String nationality;// 国籍
	@Column(name = "province", columnDefinition = ("varchar(64) comment '省份'"))
	private String province;// 省份
	@Column(name = "city", columnDefinition = ("varchar(64) comment '城市'"))
	private String city;// 城市
	@Column(name = "area", columnDefinition = ("varchar(128) comment '区县、地区'"))
	private String area;// 区县、地区
	@Column(name = "address", columnDefinition = ("varchar(128) comment '详细地址'"))
	private String address;// 详细地址
	@Column(name = "mobilePhone", columnDefinition = ("varchar(11) comment '手机号'"))
	private String mobilePhone;// 联系的手机号
	@Column(name = "telePhone", columnDefinition = ("varchar(16) comment '座机'"))
	private String telePhone;// 座机
	@Column(name = "is_default", columnDefinition = ("int(10) comment '是否为默认地址 1为默认'"))
	private int isDefault = 0;// 是否为默认地址 1为默认

	// ==================创建与编辑信息======================
	// 操作信息
	@Column(name = "editor_id", columnDefinition = ("int(10) comment '编辑人ID'"))
	private int editorId = 0;// 编辑人Id
	@Column(name = "editor_name", columnDefinition = ("varchar(64) comment '编辑人'"))
	private String editorName = "";// 编辑人
	@Column(name = "edit_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date editTime;// 编辑时间
	@Column(name = "creater_id", columnDefinition = ("int(10) comment '创建人id'"))
	private int createrId = 0;// 编辑人Id
	@Column(name = "creater", columnDefinition = ("varchar(64) comment '创建人'"))
	private String creater = "";// 编辑人
	@Column(name = "create_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	@Column(name = "delete_flag", columnDefinition = ("int(1) comment '删除标识'"))
	private int deleteFlag = 0;// 默认为不删除，1为删除

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getRecipient() {
		return recipient;
	}

	public void setRecipient(String recipient) {
		this.recipient = recipient;
	}

	public String getNationality() {
		return nationality;
	}

	public void setNationality(String nationality) {
		this.nationality = nationality;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getMobilePhone() {
		return mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	public String getTelePhone() {
		return telePhone;
	}

	public void setTelePhone(String telePhone) {
		this.telePhone = telePhone;
	}

	public int getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(int isDefault) {
		this.isDefault = isDefault;
	}

	public int getEditorId() {
		return editorId;
	}

	public void setEditorId(int editorId) {
		this.editorId = editorId;
	}

	public String getEditorName() {
		return editorName;
	}

	public void setEditorName(String editorName) {
		this.editorName = editorName;
	}

	public Date getEditTime() {
		return editTime;
	}

	public void setEditTime(Date editTime) {
		this.editTime = editTime;
	}

	public int getCreaterId() {
		return createrId;
	}

	public void setCreaterId(int createrId) {
		this.createrId = createrId;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	@Override
	public String toString() {
		return "{\"id\":\"" + id + "\", \"uuid\":\"" + uuid + "\", \"userId\":\"" + userId + "\", \"recipient\":\""
				+ recipient + "\", \"nationality\":\"" + nationality + "\", \"province\":\"" + province
				+ "\", \"city\":\"" + city + "\", \"area\":\"" + area + "\", \"address\":\"" + address
				+ "\", \"mobilePhone\":\"" + mobilePhone + "\", \"telePhone\":\"" + telePhone + "\", \"isDefault\":\""
				+ isDefault + "\", \"editorId\":\"" + editorId + "\", \"editorName\":\"" + editorName
				+ "\", \"editTime\":\"" + editTime + "\", \"createrId\":\"" + createrId + "\", \"creater\":\"" + creater
				+ "\", \"createTime\":\"" + createTime + "\", \"deleteFlag\":\"" + deleteFlag + "\"}";
	}

}
